<html>
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" >
     <meta property="fb:app_id" content="<?php echo FB_APP_ID; ?>">
     <meta property="og:type" content="website">
     <meta property="og:url" content="<?php echo base_url() . 'gallery/single/' . $avatar->id; ?>">
     <meta property="og:image" content="<?php echo FB_SHARE_PIC; ?>">
     <meta property="og:title" content="<?php echo FB_APP_TITLE; ?>">
     <meta property="og:description" content="<?php echo FB_APP_DESCRIPTION?>">
    </head>
<body>
<script type="text/javascript">
function share_image() {
  FB.ui({
    method: 'feed',
    app_id: <?php echo FB_APP_ID; ?>,
    link: '<?php echo FB_APP_URL . '&app_data=gallery,index,1,default,' . $avatar->id; ?>',
    picture: '<?php echo FB_SHARE_PIC; ?>',
    name: '<?php echo FB_APP_TITLE; ?>',
    caption: '',
    description: '<?php echo $avatar->first_name . ' ' . mb_substr($avatar->last_name, 0, 1) .'.' ?> се кандидатира за ТийНЕТ парламент\'13! Гласувай, за да подкрепиш <?php echo $avatar->first_name . ' ' . mb_substr($avatar->last_name, 0, 1) .'.' ?>! Кандидатирай се и ти, отвоювай онлайн правата на твоето поколение в истинска парламентарна битка!'
  });
}
</script>
  <div class="popup-avatar-wrapper avatar-style-<?php echo $avatar->avatar_data{0}; ?>">
    <div class="popup-first-part"><span>В интернет имам право <?php echo $first_parts[$avatar->first_part_sentence]; ?>...</span></div>
    <div class="popup-second-part"><span>ако/доколкото <?php echo $avatar->personal_message; ?></span></div>
    <div class="popup-avatar-image"><img src="<?php echo base_url() . 'uploads/' . $avatar->filename ?>" /></div>
    <div class="popup-avatar-name"><?php echo $avatar->first_name . ' ' . mb_substr($avatar->last_name, 0, 1) .'.' ?></div>
    <div class="popup-avatar-votes"><?php echo $avatar->votes ?></div>
    <div class="clear-both"></div>
    <!--
    <?php if(!$voted) : ?>
    <div class="popup-vote-button" onclick="vote('<?php echo $avatar->id; ?>');">Гласувай</div>
    <?php endif; ?>
    -->
    <div class="popup-share-button" onclick="share_image();">Сподели</div>

  </div>
</body>
</html>